package com.kun.dto;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Getter
@Setter
@ToString
@NoArgsConstructor
public class FormDataDto {

    /**
     * 控件ID
     */
    @NotBlank(message = "控件ID不能为空")
    private String controlId;
    /**
     * 控件存放值
     */
    @NotBlank(message = "控件存放值不能为空")
    private String controlValue;

    /**
     * 控件类型
     */
    @NotBlank(message = "控件类型不能为空")
    @Size(min = 1, max = 1, message = "控件类型只能是一个字符")
    @Pattern(regexp = "[stb]",message = "控件类型只能为s,t,b")
    private String controlType;

}
